<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Budget extends Admin_Controller {

	function __construct ()
	{
		parent::__construct();
		if(!$this->auth->is_admins()){
			redirect(site_url('user/login'));
		}
	}
	
	public function index()
	{
	    $get = $this->input->get();
	    if($get){
            $uis_day = !empty($get['uis_day'])?$get['uis_day']:'0';
            $web_day = !empty($get['web_day'])?$get['web_day']:'0';
            $phps_day = !empty($get['phps_day'])?$get['phps_day']:'0';
            $allday = !empty($get['allday'])?$get['allday']:'';
            if(empty($allday)){
                show_message('总共的天数必须填写',site_url(X_URL.'budget/index'),1);
            }
            $allmoney = ($uis_day*$get['uis_num']+$web_day*$get['web_num']+$phps_day*$get['phps_num'])*$allday;
            $data['allmoney'] = $allmoney;
            $data['uis_day']=$uis_day;
            $data['web_day']=$web_day;
            $data['phps_day']=$phps_day;
            $data['allday']=$allday;
            $this->load->view('budget/index',$data);
        }else{
            $this->load->view('budget/index');
        }
	}
	//新增成员
    public function add(){

    }
    //更新信息
    public function update(){

    }
    public function edit($settlement_id){

    }

    public function delete($settlement_id){

    }


}